/* eslint-disable max-lines-per-function */
import React from 'react';
// eslint-disable-next-line babel/camelcase
import {useModel} from 'umi';
import {Button, Space, Card} from 'antd';
// import {PageContainer} from '@ant-design/pro-layout';
import PageHeader from '@/components/PageHeader';

import ComA from './comone';
import ComB from './comtwo';

const Example = () => {
    const {count, increment, decrement} = useModel('example');

    // PageContainer属性请查阅https://procomponents.ant.design/components/layout#pagecontainer
    return (
        <PageHeader>
            <Card>
                <Space>
                    <Button onClick={increment}>+</Button>
                    <Button onClick={decrement}>-</Button>
                </Space>
                <div style={{width: '100%'}}>
                    父组件：{count}
                </div>
            </Card>
            <Card>
                <ComA />
            </Card>
            <Card>
                <ComB />
            </Card>
        </PageHeader>
    );
};

export default Example;
